import React, { Component } from "react";
import "./index.less";
import { Radio, Input } from "antd";

export default class GeneralSet extends Component {
  state = {
    value: 1
  };
  onChange = e => {
    console.log("radio checked", e.target.value);
    this.setState({
      value: e.target.value
    });
  };
  render() {
    return (
      <div className="general-set">
        <div className="set-shop">
          <div className="v-line"></div>
          店铺设置
        </div>
        <div className="business-set">
          <span className="up-set">经营设置</span>
          设置你的网点经营模式；多网点请前往应用-配套工具-多网点进行设置
        </div>
        <div className="status">
          <span>经营状态：</span>
          <Radio.Group onChange={this.onChange} value={this.state.value}>
            <Radio value={1}>营业</Radio>
            <Radio value={2}>休息</Radio>
          </Radio.Group>
        </div>
        <div className="setting-tip">
          设置为休息后，买家将无法在店内消费，请谨慎操作
        </div>
        <div className="set-shop">
          <div className="v-line"></div>
          交易设置
        </div>
        {/* 交易设置 */}
        <div style={{ color: "#333333", fontSize: 12 }}>
          <div className="no-limit no-pay">
            <span className="limit">待付款订单取消时间：</span>{" "}
            <span>拍下未付款订单</span>
            <Input
              className="limit-input"
              placeholder="60"
              style={{ width: 100 }}
            />{" "}
            分钟内未付款，自动取消订单
          </div>
          <div className="no-limit">
            <span className="limit">发货后自动确认收货时间：</span>{" "}
            <span>发货后</span>
            <Input
              className="limit-input"
              placeholder="7"
              style={{ width: 100 }}
            />{" "}
            天，自动确认收货
          </div>
          <div className="no-limit agreed">
            <span className="limit ">自动同意退货申请：</span>
            <Radio.Group onChange={this.onChange} value={this.state.value}>
              <Radio value={1}>开启</Radio>
              <Radio value={2}>关闭</Radio>
            </Radio.Group>
          </div>
          <div className="no-limit">
            <span className="limit">买家退货后商家自动确认收货时间：</span>
            <span>发货后</span>
            <Input
              className="limit-input"
              placeholder="7"
              style={{ width: 100 }}
            />{" "}
            天，自动确认收货
          </div>
        </div>
      </div>
    );
  }
}
